package com.books.controller.login_regis;/*
 *@Auther Zhourui
 *@data 2021/9/27  18:16
 *@Email 1605576647@qq.com
 */
import com.books.model.bo.Result;
import com.books.model.entity.login_regis.UserLogin;
import com.books.service.login_regis.IUserRegisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping(value = "/user",method= RequestMethod.GET)
public class UserRegisController {
    @Autowired(required = false)
    private IUserRegisService userRegisService;


    @PostMapping("/Registration")
    @ResponseBody
    public Result registration(UserLogin userLogin){
        userRegisService.registration(userLogin);
        userRegisService.regisuseradd(userLogin);
        return new Result("200","注册成功");
   }
}
